import request from '@/utils/request'

// 查询凭证列表
export function listVoucher(data) {
  return request({
    url: '/system/voucher/list',data,
    method: 'post',
  })
}

// 查询凭证详细
export function getVoucher(id) {
  return request({
    url: '/system/voucher/' + id,
    method: 'get'
  })
}

// 新增凭证
export function addVoucher(data) {
  return request({
    url: '/system/voucher',
    method: 'post',
    data: data
  })
}

// 修改凭证
export function updateVoucher(data) {
  return request({
    url: '/system/voucher',
    method: 'put',
    data: data
  })
}

// 删除凭证
export function delVoucher(id) {
  return request({
    url: '/system/voucher/' + id,
    method: 'delete'
  })
}
//审核
export function updateCarryForward(ids) {
  return request({
    url: '/system/voucher/examine/' + ids,
    method: 'get'
  })
}
export function updateReCarryForward(ids) {
  return request({
    url: '/system/voucher/ReExamine/' + ids,
    method: 'get'
  })
}
export function cancellationService(ids) {
  return request({
    url: '/system/voucher/cancellation/' + ids,
    method: 'get'
  })
}
export function renewService(ids) {
  return request({
    url: '/system/voucher/renew/' + ids,
    method: 'get'
  })
}
export function punchService(data) {
  return request({
    url: '/system/voucher/punch/',data,
    method: 'post'
  })
}

